package com.ahrhyj.system.domain;

import com.ahrhyj.common.annotation.Excel;
import com.ahrhyj.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * smslog对象 sys_sms_log
 * 
 * @author sentiment
 * @date 2020-09-11
 */
@ApiModel
@Data
public class SmsLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @ApiModelProperty(value = "${comment}")
    private Long id;

    /** 操作人 */
    @Excel(name = "操作人")
    @ApiModelProperty(value = "操作人")
    private Long userId;

    /** 验证码 */
    @Excel(name = "验证码")
    @ApiModelProperty(value = "验证码")
    private String code;

    /** 短信类型：0验证码  */
    @Excel(name = "短信类型：0验证码 ")
    @ApiModelProperty(value = "短信类型：0验证码 ")
    private Integer type;

    /** 必填参数。发送内容（1-500 个汉字）UTF-8编码 */
    @Excel(name = "必填参数。发送内容", readConverterExp = "1=-500,个=汉字")
    @ApiModelProperty(value = "必填参数。发送内容")
    private String content;

    /** 必填参数。手机号码。多个以英文逗号隔开 */
    @Excel(name = "必填参数。手机号码。多个以英文逗号隔开")
    @ApiModelProperty(value = "必填参数。手机号码。多个以英文逗号隔开")
    private String mobile;

    /** 可选参数。发送时间，填写时已填写的时间发送，不填时为当前时间发送 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "可选参数。发送时间，填写时已填写的时间发送，不填时为当前时间发送", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "可选参数。发送时间，填写时已填写的时间发送，不填时为当前时间发送")
    private Date stime;

    /** 1成功 0失败 */
    @Excel(name = "1成功 0失败")
    @ApiModelProperty(value = "1成功 0失败")
    private Integer sendStatus;

    /** 返回消息 */
    @Excel(name = "返回消息")
    @ApiModelProperty(value = "返回消息")
    private String returnMsg;

    /** 序列ID */
    @Excel(name = "序列ID")
    @ApiModelProperty(value = "序列ID")
    private String taskId;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("code", getCode())
            .append("type", getType())
            .append("content", getContent())
            .append("mobile", getMobile())
            .append("stime", getStime())
            .append("sendStatus", getSendStatus())
            .append("returnMsg", getReturnMsg())
            .append("taskId", getTaskId())
            .toString();
    }
}
